<div class="_contro">
    <a href="/home/action/" class="_a"><font class="_font">返回</font></a>
</div>
<div class='_cut'></div>
<div id='content'>
    <h2><?php echo $action['action_name'];?>&nbsp;&nbsp;活动分析总结</h2>
    <div class='_line'></div>
    <div>
        <div id="chart" style="height:400px;width:100%; "></div>   
    </div>
    <div class='_line'></div>
    <div style='width:100%;text-align: right'>
        <span style='background-color: #F9F900'>&nbsp;&nbsp;&nbsp;&nbsp;</span>全部&nbsp;&nbsp;&nbsp;&nbsp;
        <span style='background-color: #00DB00'>&nbsp;&nbsp;&nbsp;&nbsp;</span>已支付&nbsp;&nbsp;&nbsp;&nbsp;
        <span style='background-color: #FF2D2D'>&nbsp;&nbsp;&nbsp;&nbsp;</span>未支付&nbsp;&nbsp;&nbsp;&nbsp;
        <span style='background-color: #46A3FF'>&nbsp;&nbsp;&nbsp;&nbsp;</span>已完成&nbsp;&nbsp;&nbsp;&nbsp;
    </div>
    <div class='_line'></div>
    <div class='_line'></div>
    <div>
        本次活动产生订单：&nbsp;&nbsp;<font style='color:red'><?php echo $count_order['pay']+$count_order['not_pay']+$count_order['over'];?></font>&nbsp;&nbsp;，其中
        已支付定金订单：&nbsp;&nbsp;<font style='color:red'><?php echo $count_order['pay'];?></font>&nbsp;&nbsp;，未支付订单：
        &nbsp;&nbsp;<font style='color:red'><?php echo $count_order['not_pay'];?></font>&nbsp;&nbsp;，已完成订单：&nbsp;&nbsp;<font style='color:red'><?php echo $count_order['over'];?></font>&nbsp;&nbsp;单。
        <div class='_line'></div>
        本次活动参与用户共：&nbsp;&nbsp;<font style='color:red'><?php echo count($mobiles);?></font>&nbsp;&nbsp;人。<br/>
        <div class='_line'></div>
        其中重点用户：&nbsp;&nbsp;<font style='color:red'><?php echo count($key_user);?></font>&nbsp;&nbsp;人<br/>
        <div class='_fang'>
        <?php foreach($key_user as $k=>$v){ ?>
        <a href='#' onclick='javascript:void(0);'><?php echo $v['mobile'];?></a>&nbsp;&nbsp;&nbsp;&nbsp;
        成交单数：&nbsp;&nbsp;<font style='color:red'><?php echo $v['c'];?></font>&nbsp;&nbsp;单<br/>
        <?php }?>
        </div>
        <div class='_line'></div>
        其中潜在用户：&nbsp;&nbsp;<font style='color:red'><?php echo count($latency_user['key'])+count($latency_user['list']);?></font>&nbsp;&nbsp;人<br/>
        <div class='_fang'>
            <div class='fang'>
            待重点培养用户&nbsp;&nbsp;<font style='color:red'><?php echo count($latency_user['key']);?></font>&nbsp;&nbsp;人：<br/>
            <?php foreach($latency_user['key'] as $k=>$v){ ?>
            <a href='#' onclick='javascript:void(0);'><?php echo $v['mobile'];?></a>&nbsp;&nbsp;&nbsp;&nbsp;
            <br/>
            <?php }?>
            </div>
            <div class='_line'></div>
            <div class='fang'>
            待培养用户&nbsp;&nbsp;<font style='color:red'><?php echo count($latency_user['list']);?></font>&nbsp;&nbsp;人：<br/>
            <?php foreach($latency_user['list'] as $k=>$v){ ?>
            <a href='#' onclick='javascript:void(0);'><?php echo $v['mobile'];?></a>&nbsp;&nbsp;&nbsp;&nbsp;
            <br/>
            <?php }?>
            </div>
        </div>
        <div class='_line'></div>
        本次活动用户贡献排行：
        <div class='_fang'>
            <?php foreach($devote_user as $v){ ?>
            <a href='#' onclick='javascript:void(0);'><?php echo $v['mobile'];?></a>&nbsp;&nbsp;&nbsp;&nbsp;<font style='color:red'><?php echo $v['c'];?></font>&nbsp;&nbsp;个开团
            <br/>
            <?php }?>
        </div>
        <div class='_line'></div>
        本次活动发型师贡献排行：
        <div class='_fang'>
            <table style='width:100%;border: 0'>
            <?php foreach($devote_barber as $v){ ?>
            <tr>
                <td style='width:20%'>
            <a href='#' onclick='javascript:void(0);'><?php echo $v['name'];?></a>
                </td>
                <td>
            <font style='color:red'><?php echo $v['c'];?></font>&nbsp;&nbsp;单
            </td>
            <tr/>
            <?php }?>
            </table>
        </div>
        <div class='_line'></div>
    </div>
</div>
<script type='text/javascript' src='/public/js/jquery.jqplot.min.js'></script>
<script language="javascript" type="text/javascript" src="/public/js/plugins/jqplot.pieRenderer.js"></script>
<!--[if IE]><script type='text/javascript' src='/public/js/excanvas.js'></script><![endif]-->
<link rel="stylesheet" type="text/css" href="/public/css/jquery.jqplot.css" />  
<script type='text/javascript'>
    $(document).ready(function(){
        var _date = function(format, val){
            var newDate = new Date();
            newDate.setTime(val * 1000);
            var m = newDate.getMonth()+1;
            return m+'.'+newDate.getDate();
        }
        $.jqplot(
                'chart',  <?php echo json_encode($table_data);?>,
                {
                    title:"<?php echo $action['action_name'];?>&nbsp;&nbsp;活动数据图表",
                    seriesColors: [ "#00DB00", "#FF2D2D", "#46A3FF","#F9F900", "#579575"],  
                    axisDefaults: {},
                    axes: {  
                        xaxis: {   
                            tickOptions: { formatter: _date }, 
                        },
                    },
                }
        );
    })
</script>
